﻿using HelenServer.UserCenter.Contracts;

namespace HelenServer.UserCenter.Services;

[Injection(typeof(IDepartmentService))]
public class DepartmentService : IDepartmentService
{
    private readonly IDalDepartmentService _service;

    public DepartmentService(IDalDepartmentService service)
    {
        _service = service;
    }

    public async Task<OperationResult<int>> AddAsync(Operation<DepartmentCreateModel> operation, CancellationToken cancellationToken)
    {
        return await _service.AddAsync(operation, cancellationToken);
    }

    public async Task<OperationResult<int>> AddRangeAsync(Operation<IEnumerable<DepartmentCreateModel>> operation, CancellationToken cancellationToken)
    {
        return await _service.AddRangeAsync(operation, cancellationToken);
    }

    public async Task<OperationResult<int>> AddIdentityRangeAsync(Operation<IEnumerable<DepartmentCreateModel>> operation, CancellationToken cancellationToken)
    {
        return await _service.AddIdentityRangeAsync(operation, cancellationToken);
    }
}